package server;

import interfaces.RemoteInterface;

import java.rmi.*;
import java.rmi.registry.*;

public class Server {

	RemoteInterface remoteBusiness;
	
	public static void main(String[] args) {
		new Server();
	}
	
	public Server(){
		start();
	}

	public void start(){
		try {
			LocateRegistry.createRegistry(1099);
			remoteBusiness = new rmi.RemoteBusiness();
			Naming.rebind ("//localhost/remoteBusiness", remoteBusiness);
			System.out.println("Server loaded.");
		} 
		catch (Exception e) {
			e.printStackTrace();
		}
	}

}
